package com.linkoog.devtools.code_generator.database.domain;

public class ColumnInfo {

    private String columnName;

    // 完整的类型： bigint(20)
    private String columnType;
    // 简略的类型： bigint
    private String columnDataType;
    private String columnComment;
    private Boolean columnNullable;
    private String columnDefault;
    private String columnKey;

    private String javaFieldName;
    private String javaFieldType;

    private Boolean queryChecked;
    private Boolean insertChecked;
    private Boolean updateChecked;
    private Boolean dictChecked;
    private Boolean checked;

    public ColumnInfo(){
        this.columnComment = "";
        this.queryChecked = true;
        this.insertChecked = false;
        this.updateChecked = false;
        this.dictChecked = false;
        this.checked = true;
    }

    public ColumnInfo deepCopy(){
        ColumnInfo columnInfo = new ColumnInfo();
        columnInfo.columnName = this.columnName;
        columnInfo.columnType = this.columnType;
        columnInfo.columnDataType = this.columnDataType;
        columnInfo.columnComment = this.columnComment;
        columnInfo.columnNullable = this.columnNullable;
        columnInfo.columnDefault = this.columnDefault;
        columnInfo.columnKey = this.columnKey;

        columnInfo.javaFieldName = this.javaFieldName;
        columnInfo.javaFieldType = this.javaFieldType;

        columnInfo.queryChecked = this.queryChecked;
        columnInfo.insertChecked = this.insertChecked;
        columnInfo.updateChecked = this.updateChecked;
        columnInfo.dictChecked = this.dictChecked;
        columnInfo.checked = this.checked;

        return columnInfo;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getColumnDataType() {
        return columnDataType;
    }

    public void setColumnDataType(String columnDataType) {
        this.columnDataType = columnDataType;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    public Boolean getColumnNullable() {
        return columnNullable;
    }

    public void setColumnNullable(Boolean columnNullable) {
        this.columnNullable = columnNullable;
    }

    public String getColumnDefault() {
        return columnDefault;
    }

    public void setColumnDefault(String columnDefault) {
        this.columnDefault = columnDefault;
    }

    public String getColumnKey() {
        return columnKey;
    }

    public void setColumnKey(String columnKey) {
        this.columnKey = columnKey;
    }

    public String getJavaFieldName() {
        return javaFieldName;
    }

    public void setJavaFieldName(String javaFieldName) {
        this.javaFieldName = javaFieldName;
    }

    public String getJavaFieldType() {
        return javaFieldType;
    }

    public void setJavaFieldType(String javaFieldType) {
        this.javaFieldType = javaFieldType;
    }

    public Boolean getQueryChecked() {
        return queryChecked;
    }

    public void setQueryChecked(Boolean queryChecked) {
        this.queryChecked = queryChecked;
    }

    public Boolean getInsertChecked() {
        return insertChecked;
    }

    public void setInsertChecked(Boolean insertChecked) {
        this.insertChecked = insertChecked;
    }

    public Boolean getUpdateChecked() {
        return updateChecked;
    }

    public void setUpdateChecked(Boolean updateChecked) {
        this.updateChecked = updateChecked;
    }

    public Boolean getDictChecked() {
        return dictChecked;
    }

    public void setDictChecked(Boolean dictChecked) {
        this.dictChecked = dictChecked;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("com.github.linkoog.crud.database.domain.ColumnInfo{");
        sb.append("columnName='").append(columnName).append('\'');
        sb.append(", columnType='").append(columnType).append('\'');
        sb.append(", columnDataType='").append(columnDataType).append('\'');
        sb.append(", columnComment='").append(columnComment).append('\'');
        sb.append(", columnNullable=").append(columnNullable);
        sb.append(", columnDefault='").append(columnDefault).append('\'');
        sb.append(", columnKey='").append(columnKey).append('\'');
        sb.append(", javaFieldName='").append(javaFieldName).append('\'');
        sb.append(", javaFieldType='").append(javaFieldType).append('\'');
        sb.append(", queryChecked=").append(queryChecked);
        sb.append(", insertChecked=").append(insertChecked);
        sb.append(", updateChecked=").append(updateChecked);
        sb.append(", dictChecked=").append(dictChecked);
        sb.append(", checked=").append(checked);
        sb.append('}');
        return sb.toString();
    }
}
